home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 1
/
Nebula One.iso
/
ArchiveUtils
/
Opener3.3
/
Opener.app
/
builder
< prev
next >
Wrap
Text File
|
1995-06-12
|
1KB
|
43 lines
#! /bin/csh -f
# Attempt to build a directory full of packed comp.sources-type material
foreach d ($*)
cd $d
echo Trying to unpack and build $d ... >& .errors
set f = `ls | grep "\.Z"`
if ("$f" != "") then
echo "" >>& .errors
echo Uncompressing *.Z ... >>& .errors
uncompress *.Z
endif
foreach i (*)
egrep -l "(shell arch|Shell Arch|shar[: ]|unpack.*/bin/sh|sh this file)" $i
if (! $status) then
if (! -e archives) then
mkdir archives
endif
echo "" >>& .errors
echo Unbundling shar archive $i... >>& .errors
sed '1,/^[:#]/d' $i | /bin/sh >>& .errors
mv $i archives
endif
end
if (-e Makefile || -e makefile) then
echo "" >>& .errors
echo Making $d ... >>& .errors
make >>& .errors
else
set f = `echo $d:t | sed 's/O_//'`
if (-e $f) then
set f = O_$f
endif
set c = `ls | grep "\.c"`
if ("$c" != "") then
echo "Compiling (best guess) ..." >>& .errors
echo "cc -o $f *.c" >>& .errors
cc -o $f *.c >>& .errors
endif
endif
mv .errors errors
end